
using abilities.templates;

namespace abilities.effects
{
    // 无敌，无法选择单位作为目标。
    public class EffectImmune : Effect<EffectImmuneTemplate>
    {

        public EffectImmune(EffectImmuneTemplate t,int level) : base(t,level)
        {
        }

        

        protected override void Apply(UnitObject objectview, bool replay)
        {
            UnitObject owner = objectview as UnitObject;
            if (!owner)
            {
                return;
            }

            // owner.setIsImmune(true);
            // owner.setCanBeTargeted(canBeSelectedAsTarget, true);
        }

        protected override void Cancel(UnitObject objectv, bool replay)
        {
            UnitObject owner = objectv as UnitObject;
            if (!owner)
            {
                return;
            }

            // owner.setIsImmune(false);
            // owner.setCanBeTargeted(true, true);
        }
    }
}